package com.fxkj.cloud.drms.ui.emqx;

import com.fxkj.cloud.drms.ui.emqx.model.EmqxClientInfo;
import com.fxkj.cloud.drms.ui.emqx.model.EmqxResponse;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.service.annotation.GetExchange;
import org.springframework.web.service.annotation.HttpExchange;

import java.util.List;

/**
 * <p>Description: </p>
 *
 * @author Wei, Wu
 * @create 2024/9/26 13:23
 */
@HttpExchange(accept = "application/json", contentType = "application/json")
public interface EmqxAuthorizedClient {
    @GetExchange("api/v5/clients")
    EmqxResponse<List<EmqxClientInfo>> getOnlineClient(@RequestParam("like_clientid") String likeClientid,
                                                       @RequestParam(name = "limit", required = false, defaultValue = "10000") Integer limit,
                                                       @RequestParam(name = "page") Integer page,
                                                       @RequestParam("fields") String fields);

    @GetExchange("api/v5/clients/{clientid}")
    EmqxClientInfo getClientInfo(@PathVariable("clientid") String clientid);
}
